import request from '@/utils/request.js'

export const regAPI = obj => request.post('/api/reg', obj)
export const loginAPI = obj => request.post('/api/login', obj)

export const getUserAPI = () => request.get('/my/userinfo')

// 获取左侧菜单栏列表
export const getMenuAPI = () => request.get('/my/menus')

// 更新修改后的用户信息api
export const updateAPI = obj => request.put('/my/userinfo', obj)

// 上传头像
export const updataImgAPI = str => request.patch('/my/update/avatar', { avatar: str })

// 修改密码
export const updatePwdAPI = obj => request.patch('/my/updatepwd', obj)
